package com.oswego.dawcs;

import java.util.ArrayList;
import java.util.List;

public enum Theme {
	ORIGINAL(1, "Metallic", R.drawable.close,R.drawable.knob, R.drawable.thumb1,
            R.drawable.seekbar_progress, R.drawable.black_bg, R.drawable.channel_grad),
    BLACKANDBLUE(2, "Black and Blue", R.drawable.close, R.drawable.bnb_knob, R.drawable.bnb_thumb,
            R.drawable.bnb_seekbar_progress, R.drawable.black_bg, R.drawable.channel_grad),
    BLACKANDYELLOW(3, "Black and Yellow", R.drawable.close, R.drawable.bny_knob, R.drawable.bny_thumb,
            R.drawable.bny_seekbar_progress, R.drawable.black_bg, R.drawable.channel_grad),
    BLACKANDRED(4, "Black and Red", R.drawable.close, R.drawable.bnr_knob, R.drawable.bnr_thumb,
            R.drawable.bnr_seekbar_progress, R.drawable.black_bg, R.drawable.channel_grad),
    BLACKANDORANGE(5, "Black and Orange", R.drawable.close, R.drawable.bno_knob, R.drawable.bno_thumb,
                R.drawable.bno_seekbar_progress, R.drawable.black_bg, R.drawable.channel_grad),
    BLACKANDPINK(6, "Black and Pink", R.drawable.close, R.drawable.bnp_knob, R.drawable.bnp_thumb,
                R.drawable.bnp_seekbar_progress, R.drawable.black_bg, R.drawable.channel_grad),
    BLACKANDPURPLE(7, "Black and Purple", R.drawable.close, R.drawable.bnpp_knob, R.drawable.bnpp_thumb,
                R.drawable.bnpp_seekbar_progress, R.drawable.black_bg, R.drawable.channel_grad),
    BLACKANDGREEN(8, "Black and Green", R.drawable.close, R.drawable.bng_knob, R.drawable.bng_thumb,
                R.drawable.bng_seekbar_progress, R.drawable.black_bg, R.drawable.channel_grad);


	
	private final int themeID;
    private String themeName;
	private final int closeButtonID;
	private final int knobId;
	private final int thumbID;
	private final int seekbarBackgroundID;
	private final int appBackgroundID;
	private final int channelBackgroundID;
	
	private Theme(int id, String name, int close, int knob, int thumb, int seekbar, int bg, int chanBG){
		this.themeID = id;
        this.themeName = name;
		this.closeButtonID = close;
		this.knobId = knob;
		this.thumbID = thumb;
		this.seekbarBackgroundID = seekbar;
		this.appBackgroundID = bg;
		this.channelBackgroundID = chanBG;
	}

    public static ArrayList<String> getThemeNames(){
        ArrayList<String> names = new ArrayList<String>();
        for(Theme t : Theme.values()){
            names.add(t.getThemeName());
        }
        return names;
    }

    public static ArrayList<Integer> getThemeIds(){
        ArrayList<Integer> ids = new ArrayList<Integer>();
        for(Theme t : Theme.values()){
            ids.add(t.getThemeID());
        }
        return ids;
    }

	public int getThemeID() {
		return themeID;
	}

    public String getThemeName() {
        return themeName;
    }

    public int getCloseButtonID() {
		return closeButtonID;
	}

	public int getKnobID() {
		return knobId;
	}

	public int getThumbID() {
		return thumbID;
	}

	public int getSeekbarBackgroundID() {
		return seekbarBackgroundID;
	}

	public int getAppBackgroundID() {
		return appBackgroundID;
	}

	public int getChannelBackgroundID() {
		return channelBackgroundID;
	}

    public String getName(){
        return themeName;
    }

    public static String getNameForThemeId(int id){
        for(Theme t : Theme.values()){
            if(t.getThemeID() == id){
                return t.getThemeName();
            }
        }
        return "";
    }

    public static Theme getThemeFromId(int id){
        for(Theme t : Theme.values()){
            if(t.getThemeID() == id){
                return t;
            }
        }
        return null;
    }

    @Override
    public String toString(){
        return themeName;
    }

}
